home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'UpdSqlEd.pas' rev: 3.00
-
- #ifndef UpdSqlEdHPP
- #define UpdSqlEdHPP
- #include <Menus.hpp>
- #include <Windows.hpp>
- #include <SysUtils.hpp>
- #include <Classes.hpp>
- #include <ComCtrls.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <ExtCtrls.hpp>
- #include <DBTables.hpp>
- #include <Db.hpp>
- #include <Forms.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Updsqled
- {
- //-- type declarations -------------------------------------------------------
- typedef void __fastcall (__closure *TWaitMethod)(void);
-
- class DELPHICLASS TUpdateSQLEditForm;
- class PASCALIMPLEMENTATION TUpdateSQLEditForm : public Forms::TForm
- {
- typedef Forms::TForm inherited;
-
- __published:
- Stdctrls::TButton* OkButton;
- Stdctrls::TButton* CancelButton;
- Stdctrls::TButton* HelpButton;
- Stdctrls::TButton* GenerateButton;
- Stdctrls::TButton* PrimaryKeyButton;
- Stdctrls::TButton* DefaultButton;
- Stdctrls::TComboBox* UpdateTableName;
- Comctrls::TTabSheet* FieldsPage;
- Comctrls::TTabSheet* SQLPage;
- Comctrls::TPageControl* PageControl;
- Stdctrls::TListBox* KeyFieldList;
- Stdctrls::TListBox* UpdateFieldList;
- Stdctrls::TGroupBox* GroupBox1;
- Stdctrls::TLabel* Label1;
- Stdctrls::TMemo* SQLMemo;
- Dbtables::TTable* FTempTable;
- Extctrls::TRadioGroup* StatementType;
- Stdctrls::TCheckBox* QuoteFields;
- Stdctrls::TButton* GetTableFieldsButton;
- Menus::TPopupMenu* FieldListPopup;
- Menus::TMenuItem* miSelectAll;
- Menus::TMenuItem* miClearAll;
- void __fastcall FormCreate(System::TObject* Sender);
- void __fastcall HelpButtonClick(System::TObject* Sender);
- void __fastcall StatementTypeClick(System::TObject* Sender);
- void __fastcall OkButtonClick(System::TObject* Sender);
- void __fastcall DefaultButtonClick(System::TObject* Sender);
- void __fastcall GenerateButtonClick(System::TObject* Sender);
- void __fastcall PrimaryKeyButtonClick(System::TObject* Sender);
- void __fastcall PageControlChanging(System::TObject* Sender, bool &AllowChange);
- void __fastcall FormDestroy(System::TObject* Sender);
- void __fastcall GetTableFieldsButtonClick(System::TObject* Sender);
- void __fastcall SettingsChanged(System::TObject* Sender);
- void __fastcall FormCloseQuery(System::TObject* Sender, bool &CanClose);
- void __fastcall UpdateTableNameChange(System::TObject* Sender);
- void __fastcall UpdateTableNameClick(System::TObject* Sender);
- void __fastcall SelectAllClick(System::TObject* Sender);
- void __fastcall ClearAllClick(System::TObject* Sender);
- void __fastcall SQLMemoKeyPress(System::TObject* Sender, char &Key);
-
- private:
- int StmtIndex;
- Dbtables::TDBDataSet* DataSet;
- Dbtables::TDatabase* Database;
- bool DatabaseOpened;
- Dbtables::TUpdateSQL* UpdateSQL;
- bool FSettingsChanged;
- bool FDatasetDefaults;
- Classes::TStrings* SQLText[3];
- System::AnsiString __fastcall GetTableRef(const System::AnsiString TabName, const System::AnsiString
- QuoteChar);
- bool __fastcall DatabaseOpen(void);
- bool __fastcall Edit(void);
- void __fastcall GenWhereClause(const System::AnsiString TabAlias, const System::AnsiString QuoteChar
- , Classes::TStrings* KeyFields, Classes::TStrings* SQL);
- void __fastcall GenDeleteSQL(const System::AnsiString TableName, const System::AnsiString QuoteChar
- , Classes::TStrings* KeyFields, Classes::TStrings* SQL);
- void __fastcall GenInsertSQL(const System::AnsiString TableName, const System::AnsiString QuoteChar
- , Classes::TStrings* UpdateFields, Classes::TStrings* SQL);
- void __fastcall GenModifySQL(const System::AnsiString TableName, const System::AnsiString QuoteChar
- , Classes::TStrings* KeyFields, Classes::TStrings* UpdateFields, Classes::TStrings* SQL);
- void __fastcall GenerateSQL(void);
- void __fastcall GetDataSetFieldNames(void);
- void __fastcall GetTableFieldNames(void);
- void __fastcall InitGenerateOptions(void);
- void __fastcall InitUpdateTableNames(void);
- void __fastcall SetButtonStates(void);
- void __fastcall SelectPrimaryKeyFields(void);
- void __fastcall SetDefaultSelections(void);
- void __fastcall ShowWait(TWaitMethod WaitMethod);
- Dbtables::TTable* __fastcall TempTable(void);
- public:
- /* TCustomForm.Create */ __fastcall virtual TUpdateSQLEditForm(Classes::TComponent* AOwner) : Forms::
- TForm(AOwner) { }
- /* TCustomForm.CreateNew */ __fastcall TUpdateSQLEditForm(Classes::TComponent* AOwner, int Dummy) :
- Forms::TForm(AOwner, Dummy) { }
- /* TCustomForm.Destroy */ __fastcall virtual ~TUpdateSQLEditForm(void) { }
-
- public:
- /* TWinControl.CreateParented */ __fastcall TUpdateSQLEditForm(HWND ParentWindow) : Forms::TForm(ParentWindow
- ) { }
-
- };
-
- enum TSQLToken { stSymbol, stAlias, stNumber, stComma, stEQ, stOther, stLParen, stRParen, stEnd };
-
- class DELPHICLASS TSQLParser;
- class PASCALIMPLEMENTATION TSQLParser : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- System::AnsiString FText;
- char *FSourcePtr;
- char *FTokenPtr;
- System::AnsiString FTokenString;
- TSQLToken FToken;
- bool FSymbolQuoted;
- TSQLToken __fastcall NextToken(void);
- bool __fastcall TokenSymbolIs(const System::AnsiString S);
- void __fastcall Reset(void);
-
- public:
- __fastcall TSQLParser(const System::AnsiString Text);
- void __fastcall GetSelectTableNames(Classes::TStrings* List);
- void __fastcall GetUpdateTableName(System::AnsiString &TableName);
- void __fastcall GetUpdateFields(Classes::TStrings* List);
- void __fastcall GetWhereFields(Classes::TStrings* List);
- public:
- /* TObject.Destroy */ __fastcall virtual ~TSQLParser(void) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
- extern PACKAGE bool __fastcall EditUpdateSQL(Dbtables::TUpdateSQL* AUpdateSQL);
-
- } /* namespace Updsqled */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Updsqled;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // UpdSqlEd
-